home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: newshub.ariel.cs.yorku.ca!cs911319
- From: cs911319@ariel.cs.yorku.ca (STEPHEN HOI CHI KONG)
- Subject: Re: how do i...
- X-Nntp-Posting-Host: red
- Message-ID: <DKvC14.Ft6@ariel.cs.yorku.ca>
- Sender: news@ariel.cs.yorku.ca (*)
- Organization: York University, Dept. of Computer Science
- References: <4cl4ja$558@news-e2a.gnn.com>
- Date: Mon, 8 Jan 1996 15:22:16 GMT
-
- In article <4cl4ja$558@news-e2a.gnn.com> MrBurns@gnn.com (Kevin Kalstein) writes:
- >hi all. i wrote an address book that saves addresses to disk
- >with a .adr extension. i want to create a feature that allows
- >the user to see the .adr files in the directory. basically
- >what im looking for is a command that will let me do the dos
- >equivalent of "dir *.adr". unfortunately i cant find any
- >commands to do this. im using borland c++ version 3.0.
- >(note this program is written in C not C++). any help would
- >be greatly appreciated.
-
- I believe you have two ways to do it.
-
- 1.) write a batch file as follow:
-
- REM listadr.bat
- REM put this batch file into DOS\ directory
- REM usage C:\>listadr <enter>
- @echo off
- dir *.adr /w
-
- 2.) using 'system()' library function in C
-
- #include <stdlib.h>
-
- i.e. system ("dir *.adr/w"); /* puts this statement in your C program */
-
-
- I hope these help.
-
- Zollen
-
-
-
-
-
-